#include <stdio.h>
#include <math.h>

double distance(double x1, double y1, double x2, double y2)
{
    return sqrt(pow(x1-x2, 2.0) + pow(y1 - y2, 2.0));
}

int main(void)
{
    int n;
    double x1, y1, x2, y2;
    scanf("%d",&n);
    while(n>0)
    {
        n--;
        scanf("%lf%lf%lf%lf", &x1, &x2, &y1, &y2);
        printf("%.4lf\n", distance(x1, x2, y1, y2));
    }
    return 0;
}

